<?php
/**
 * startup file release
 * @author matt@cruelyouth.com
 * @version 1.0
 */
defined('DOCUMENT_PATH') or define('DOCUMENT_PATH', realpath(dirname(__FILE__)));
defined('LIB_PATH') or define('LIB_PATH', DOCUMENT_PATH."/libs");
defined('CONFIG_PATH') or define('CONFIG_PATH', DOCUMENT_PATH."/configs");
defined('APP_PATH') or define('APP_PATH', DOCUMENT_PATH.'/apps');
defined('VIEW_PATH') or define('VIEW_PATH', DOCUMENT_PATH.'/views');
defined('LOG_PATH') or define('LOG_PATH', DOCUMENT_PATH.'/logs');
defined('CACHE_PATH') or define('CACHE_PATH',DOCUMENT_PATH.'/caches');
defined('RESOURCE_PATH') or define('RESOURCE_PATH', DOCUMENT_PATH.'/res');
define('CURRENT_TIME',time());

defined('CT_PAGE_SIZE') or define('CT_PAGE_SIZE',16);
defined('CT_UPLOAD_PATH') or define('CT_UPLOAD_PATH',DOCUMENT_PATH.'/upload/');
defined('CT_CACHE_PATH') or define('CT_CACHE_PATH',DOCUMENT_PATH.'/cachedata/');
defined('CT_SEPARATOR')	 or define('CT_SEPARATOR',',');

defined('DOMAIN') or define('DOMAIN','manhuaguoji.com');
defined('UPLOAD_DOMAIN') or define('UPLOAD_DOMAIN','http://img.'.DOMAIN);

defined('COOKIE_KEY') or define('COOKIE_KEY','_i');

/**
 * 错误代码定义
 */
define('ERR_EXISTS',1001);		//已经存在
define('ERR_NOT_FOUND',1002);	//没有找到
define('ERR_PARAMATER',1003);	//参数错误


set_include_path(
	get_include_path()
	.PATH_SEPARATOR.LIB_PATH
	.PATH_SEPARATOR.APP_PATH
);

include_once(CONFIG_PATH.'/admin-config.php');

## include common libs
require_once '_class.database.DBFactory.inc.php';
require_once '_class.cache.MemcacheGroup.inc.php';
require_once '_class.io.Graphic.inc.php';
require_once '_class.io.VerificationCode.inc.php';
require_once '_class.mail.PHPMailer.inc.php';
require_once '_func.http.page.inc.php';
require_once '_func.http.url.inc.php';
require_once '_func.io.file.inc.php';
require_once '_func.text.sig.inc.php';
require_once '_func.text.string.inc.php';
require_once '_func.util.common.inc.php';
require_once '_func.util.date.inc.php';
require_once '_class.xml.SOAPHelper.inc.php';
require_once '_class.http.SoapClientEx.inc.php';
require_once '_class.cache.MemcacheGroup.inc.php';
require_once 'login/class.securelogin.inc.php';
require_once '_class.http.MultiFetcher.inc.php';

## 初始�? zend autoload111
require_once "Zend/Loader.php";
Zend_Loader::registerAutoload();

date_default_timezone_set('Asia/Shanghai');

//header('Content-Type: text/html; charset=UTF-8');